import { createApp } from "vue";
import { createPinia } from "pinia";
import persistedstate from "pinia-plugin-persistedstate"

// 引入vant组件
import { Button,Tabbar,TabbarItem,Swipe,SwipeItem,Toast,Grid,GridItem,CountDown,NavBar,Icon,Popover,Popup,ActionBar, ActionBarIcon, ActionBarButton, Form, Field,Cell, CellGroup,Dialog,Notify,SwipeCell,Card,Checkbox,Stepper,SubmitBar,AddressList,ContactCard,Empty,AddressEdit} from "vant";
// 引入vant样式
import 'vant/lib/index.css'

import App from "./App.vue";
import router from "./router";

import 'normalize.css';

const app = createApp(App);
const pinia = createPinia()

//注册pinia的持久化插件
pinia.use(persistedstate);

app.use(pinia);
app.use(router);

// 注册vant组件
app
.use(Button)
.use(Tabbar)
.use(TabbarItem)
.use(Swipe)
.use(SwipeItem)
.use(Toast)
.use(Grid)
.use(GridItem)
.use(CountDown)
.use(NavBar)
.use(Icon)
.use(Popover)
.use(Popup)
.use(ActionBar)
.use(ActionBarIcon)
.use(ActionBarButton)
.use(Form)
.use(Field)
.use(Cell)
.use(CellGroup)
.use(Dialog)
.use(Notify)
.use(SwipeCell)
.use(Card)
.use(Checkbox)
.use(Stepper)
.use(SubmitBar)
.use(AddressList)
.use(ContactCard)
.use(Empty)
.use(AddressEdit);

app.mount("#app");
